home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Game-Power
/
Amiga Game-Power.iso
/
pd mix i
/
pict saver
/
analyrim
/
dbmsdocs.zoo
/
AnalyFunctionRef.Card
next >
Wrap
Text File
|
1991-10-19
|
43KB
|
865 lines
COMMANDS
The commands available in AnalytiCalc are each described separa-
tely. The following is a brief listing alphabetically of their
names. Some infrequently used commands are omitted.
+J filename Start journaling to filename
+N Close journal file
< Rewind input file
%prompt%cmd%key% Issue prompt and do cmd depending on key
$ or } Perform operating system command
> or >>pattern Search for formula containing or starting
with pattern
* Comment line
-prompt Load arguments after prompt
// Use "Command-Mostly" mode
/; Use "Enter-Mostly" mode
/# Swap current mode with save mode
(command-mostly or enter-mostly)
1,2,3, or 4 Move cursor Up, Down, Left, or Right
@file.typ Read file.typ as input instead of console
AA nn {R/C} Add absolute nn rows or columns
AR nn {R/C} Add relocating nn rows or columns (nn may
be neg)
CA in-range out-range Copy All (Absolute)
CV in-range out-range Copy Value
CF in-range out-range Copy Formula (and Format)
CR in-range out-range Copy Relocating (all)
DB ncol,nrow Display Bounds (no. cols,rows on screen)
DF range [format] Display Format of range to format
DL range {R/C}n:m Display Locate range as Row/Col to dis-
play col:row n:m
DS{R/C}{A/D} n Display Sort row/col, Asc/Desc row/col n
DT range {F/I} Display Type range as Float or Integer
DW ncol,wid Display Width of col "ncol" to "wid"
chars
E expression Enter expression into cell
E" expression Enter expression as text, no case
translation
ED 'oldstring'newstring' EDit cell
ET expression Enter expression as UPPER CASE text
EV expression Enter expression as computable formula
F filename/nskip File read from filename onto display
G Get saved sheet. Many variants.
Hn HELP and show page n
IR inrange outrange In Place Relocate inrange as if moved to
outrange
K Go into interactive calculator (need
*V 3). *E goes back.
L cell Go to cell
M{0/1/2/3/4/5} Move - set move direction after enter
MS or MH Macrocell Show or Hide - show or hide in-
cluded files.
OA cell Origin Absolute cell - Map Screen with
cell in upper left
OAD cell Origin Absolute Displace cell - Map
Screen with cell in upper left leaving
old windowing alone
OR cell Origin Relative cell - map screen
down/right of cursor with cursor=cell
ORD cell Origin Relative Displace cell - map
screen down/right of cursor with
cursor=cell leaving old windows
OV + OVerride absolute refs, make relative
OV - OVerride off - let abs refs be absolute
P Put (save) spreadsheet. Many variations.
PL v1:v2[,v3:v4][;plot command] Save plot number file and invoke plot
command. commands are designed to allow
use by GnuPlot or similar.
R Recalculate sheet
RB cell Set Relocate Boundary at cell
RF Recalculate, Force recalc of constants
RM Recalculate Manual - no recalc until R
cmd
S Setup - Global mapping/width/title setups
TE expression TEst - Evaluate math expression in cmd
mode - many special variants.
V View - Redraw screen
VF View Formulas - Draw with Formulas in-
stead of numbers
VM View Manual - no screen repaint until a V
cmd
VH+, VH- View Hack on/off. Controls display of row
being calculated during recalcs.
W Write display to file or printer.
X eXit from AnalytiCalc. Asks for confir-
mation.
ZE range ZEro range of cells
ZA Zero All of sheet. Asks for confirma-
The available multiple argument functions are:
SUM[variables] Sum of all arguments
MAX[variables] Max of arguments
MIN[variables] Min of arguments
AVG[variables] Average of arguments
AVE[variables] Average of arguments ignoring cells
containing 0.0 (e.g., labels)
STD[variables] Standard deviation squared
IF [V1.rel.V2] statement | else-statement
AND[variables] Boolean AND of all variables in list
IOR[variables] Boolean inclusive OR of variables
NOT[variable] Boolean complement of variable
XOR[v1,v2] Boolean exclusive OR of v1,v2
EQV[V1,V2] Boolean "equivalence" of V1,V2
(complement of exclusive OR, true if
bits have the SAME value)
CNT[variables] Number of nonzero variables in list
MOD[V1,V2] Returns V1 modulo V2 (i.e., remainder
of V1/V2 division.)
SGN[v1] Returns 1.0 times sign of V1
LKP[var,variables] Lookup variable in "variables" range
greater or equal to var, return its
index (starting with 0) into variables
range.
LKN[var,variables] Lookup variable in "variables" range
less than or equal to var, return its
index (starting with 0) into variables
range.
LKE[var,variables] Lookup variable in "variables" range
strictly equal to var, return its index
(starting with 0) into range. Note all
LKP, LKN, LKE return the last variable
index if no satisfactory value found.
NPV[disc,vars] Net Present Value of vars (equal time
values assumed; computes discount
disc where disc is a fraction
(e.g., .12 for 12%). Be sure the arguments
are all cells, not literals, including the
disc argument. Set a cell to the fraction
desired for the disc argument and use its
name in the arguments to NPV, rather than
attempting to use a literal (e.g., 0.12)
directly.
IRR[PV,FV,returns] Internal Rate of Return. Will compute
internal rate of return on up to 20
periods, returning rate per period.
The returns are expected to be at
equal time intervals. PV and FV are
initial and final values of investment
and the result is computed via Newton
approximation. As with all functions here,
be sure all arguments are cell names, not
literal numbers.
PMT[princ,inter,nper] Payment function. Generates payment
given principal amount, interest per
period (as a fraction), and number of
periods.
PVL[pmt,inter,nper] Present Value function. Generates present
value of a loan given payment amount,
interest rate, and number of periods.
All financial functions assume that
payments are for equal time intervals.
RND[V1] Random number. Generates a random number
distributed uniformly in the interval
0.0 to 1.0. An argument is required but
never touched.
CHS[Idx,Range] Choose cell from range based on value of cell
Idx. If cell IDX contains 1, first element of
range is chosen; if 2, second, etc. Zero is
returned if out of range. Range can be any
comma-delimited list of ranges also.
ATM[A1,A2] Arc Tangent of A1/A2, but four quadrant
version. Note these are single cells.
In all cases except IF, arguments are variable names separated by
commas, or variable ranges, or mixtures separated by columns. Note
too that ALL THESE FUNCTIONS REQUIRE CELLS OR ACCUMULATORS AS
ARGUMENTS; literals and single argument functions may NOT be used
here. (That is why it is easy to place multiple commands on a line;
the ACs or cells may be loaded in "separate" steps.) The IF [] state-
ment is a partial exception since a range may be used to replace ei-
ther variable inside the [] condition brackets. The sum of the
ranges will be used in that case. A possible IF statement might look
like
IF [S2.LT.S5] R=2. | R=0.
Summary of Variable Addressing
Variable names may be of several forms; examples will be given
first to illustrate.
D5 - Cell is in column D, 5th row down. (Col. 4, Row 5)
D$5 - Cell is column D, 5th row down, but in relocating copies
the column (D) is not altered (unless the global override is set).
D5$ - As above but the row is not alterable.
D$5$ - As above but neither row nor column may be altered...an
"absolute" reference.
P#4#7 - Cell addressed is 4 columns to the right of and 7 rows
down from the current cell. (P#0#0 is the current cell). These are
computed on the base spreadsheet. This form of addressing is not
subject to relocation, ever.
D#4#7 - Cell addressed is the cell DISPLAYED 4 columns to the
right of the current one and 7 rows down. Since the display map can
be anything, this means the actual cell referenced can be anything,
depending on the current display. This form of addressing is not
subject to relocation, ever.
P#%AB - Supposing accumulator A contains 4 and accumulator B
contains 7, the cell referenced is 4 columns right of the current one
and 7 rows down on the physical sheet.
D#%AB - Supposing accumulator A contains 4 and accumulator B
contains 7, the cell referenced is 4 columns right of the current one
and 7 rows down on the display.
P#_AB - If accumulator A contains 4 and accumulator B contains
2, the cell addressed is D2 (4th column over, 2nd row).
P#$D3:C2: - if cell D3 contains 4.0 and cell C2 contains 2.0,
the cell addressed is D2 again.
Variable Names
A valid variable name might be H14 or N22 or A3, or the position
independent forms P#n#m and D#n#m where n and m are offsets in Physi-
cal or Display sheets from the current column and row. A valid range
is 2 variable names separated by colon (:). Thus the range B2:B12 is
valid and means B2 through B12 inclusive. The range expression
D#0#1:D#0#12 is also valid and means the cells on the display sheet
in the same column but 1 to 12 rows down from the current cell in-
clusive. (The displacements may be negative too, with - sign to in-
dicate it, as D#-3#2 for the display cell 3 columns left and 2 rows
down from the current position.) The P# and D# forms are valuable
since they work wherever you move them. Other variables may be relo-
cated when moved (renaming them to correspond to their new loca-
tions), but the P# and D# forms need never change and allow working
with projections across the physical sheet in various ways. There
are a few restrictions with these forms. They usually need to be en-
closed in parentheses (e.g. (P#3#5) rather than P#3#5) inside ex-
pressions. For most purposes they do work interchangeably with other
name schemes however, though the "normal" naming scheme is generally
easier to use. Copying with relocation works with normal cell names,
provided that the cursor is above and left of cells to be renamed
(see below). The keypad copy command normally moves to A1 during a
copy for this reason. The D# forms do not always work in the ex-
tended address areas of the sheet, depending on recalculation mode.
The special construction P#%ab or D#%ab allows relative address-
ing relative to current physical or display location using accumula-
tors named a or b (where a or b may be any accumulator name from A
through Z but upper case is REQUIRED). This computable relative ad-
dressing affords greater flexibility in command procedure construc-
tion.
In Amiga AnalytiCalc, the cell address form P#_cr is available.
This address provides absolute cell addresses using the numbers in
the two accumulators c and r for the column and row of the cell to be
accessed. Since accumulators run out somewhat quickly in
AnalytiCalc, an alternate addressing form is also provided. If cell
Cn holds a column number and cell Rn holds a row number, the cell
name P#$Cn:Rn: will address the cell whose column is in Cn and whose
row is in Rn. Such addressing may be indirect to one level only;
that is, the Cn and Rn may be any legal address form for a cell
EXCEPT the P#$cell1:cell2: form. These address forms permit a
degree of data driven computation unavailable in other spreadsheet
type programs.
If a formula contains the construction {VN (where VN is any cell
name), the FORMULA for cell VN is inserted into the formula being
evaluated at that point, when the cell value is to be computed.
Function Arguments
Note that the square brackets ([]) are needed to delimit
arguments in multiple argument functions. The results are left in
accumulator % and in the cell. The IF form will compare 2 variables
and execute either the statement or the else-statement (which must
NOT be another IF). The valid relations are:
.EQ. Equal
.NE. Not Equal
.GT. Greater than (V1 greater than V2)
.LT. Less than (V1 less than V2)
.GE. Greater than or Equal to (V1 >= V2)
.LE. Less than or Equal to (V1 =< V2)
and must appear in this form. (Note that your formulas must
generally be in upper case only; text can be anything.)
Accumulators (Scratch Storage)
The single letter accumulators of Calc mode (letters A through Z
and %) are available globally and may take on all Calc mode data
types.
Formulas entered may have the following constructs which will be
edited into the formula as entered (so a command file can enter
them):
_@V1,V2 Means get the values stored in V1 and V2 and use
them as column and row locations pointing at some cell
in the sheet. Replace the construct with the name of
that cell.
_#V1 Means take the real number in cell V1 and unpack it as
if it had been a packed value from a formula with 8
characters packed; then convert it back into ASCII and
place in the formula in place of this construct. This
construct is intended to be used with the *U STRVL
function to allow retrieval and edit of formulas. The
*U XQTCM function permits use of the EDit command (as
well as others) within a cell for string manipulation.
Only 8 characters at a time may be represented (the
limit imposed by cell size), but repeated use allows
handling any desired length. An application would be
setting the cell used as V1 to a packed representation
of either of two strings inside an IF [] and then EDit-
ing the string into the formula as desired where one of
the 2 strings should be made to appear. This capabil-
ity is crude but provides the bare bones functionality.
Additional USRFCT calls to give simpler (but more ver-
bose) string manipulations are not too hard to add
should the user need them.
Formula Length
Formulas have 109 characters allotted to them for use inside the
spread sheet. The *@file command may be used to extend this to any length
via an external macro.
The following special functions are available:
FUNCT NAME ARG TYPE FUNCT VALUE DESCRIPTION
-------------------------------------------------------
ABS REAL REAL absolute value
DABS REAL REAL absolute value
IABS INTEGER INTEGER absolute value
IFIX REAL INTEGER REAL to INT conv.
AINT REAL REAL REAL truncation
INT REAL INTEGER REAL to INT conv.
IDINT REAL INTEGER REAL to INT conv.
EXP REAL REAL e**X
DEXP REAL REAL e**X
ALOG REAL REAL natural logarithm
DLOG REAL REAL natural logarithm
ALOG10 REAL REAL logarithm base 10
DLOG10 REAL REAL logarithm base 10
SQRT REAL REAL square root
DSQRT REAL REAL square root
SIN REAL REAL trigonometric sine
DSIN REAL REAL trigonometric sine
COS REAL REAL trig. cosine
DCOS REAL REAL trig. cosine
TANH REAL REAL hyperbolic tangent
DTANH REAL REAL hyperbolic tangent
ATAN REAL REAL arc tangent
DATAN REAL REAL arc tangent
AnalytiCalc File Interface Functions
Command level functions are given as FILcccccc where ccc is the
actual command. Equivalent functions are available from cells using
the syntactic form *U DBcccccc arguments (where the "arguments" part
is any arguments, generally some required.)
Some extra optional VAX functions exist that allow regions of
the sheet to come from or go to sequential or random files to or from
some range of cells.
The following commands exist (the "*U DB" or the "FIL" is
omitted:)
OPINS range filename
Open input sequential on filename for cells in range When
the input file is open and any operation causes a read of
the cell, the FORMULA will be taken from the file and used.
If the file is opened with the OPINU option (for Update),
then when the FORMULA of the cell is written, it will also
write to the file. The OPINU option applies only to random
access files. Initially both input and output reads are
disabled (ENAINP and ENAOUT enable them). When a sequential
file (or device such as a mailbox, pipe, or communications
line) is used for input, it is advantageous to read data
into a range once, then disable input/output again, to allow
it to be handled between these commands. The EDTINP and
FMTOUT commands are designed to do this to make it easier to
use AnalytiCalc for a filter between sequential files.
OPINR range filename
Open input random on filename for cells in range
OPINU range filename
Open range for update on filename for read and write as ran-
dom access.
CLSINP
Close input
CLSOUT
Close output
OPOUTS range filename
Open output sequential from range cells to filename
OPOUTR range filename
Open output random from range on filename
ENAINP
Enable input file readin (initially disabled)
ENAOUT
Enable output write (initially disabled)
DISINP
Disable input area readin
DISOUT
Disable output write
EDTINP range
Enables input and output and, for each cell in the given
range, reads and writes the cell, allowing the file
read/writes to take effect. Each cell is flagged as valid
but of text type; the DF command must be used to reset any
that should be treated as computable. Input and output are
disabled on completion of the command.
FMTOUT range
VALOUT range
Enables input and output and for each cell of the range
takes the VALUE of the cell, reads the cell, sets it of text
type, and writes the text equivalent of its value to the
cell. In the FMTOUT command the cell's display format is
used for the conversion. In the VALOUT command a large
builtin format is used to preserve all significant digits.
Spaces are discarded prior to output. Cells are left con-
taining textual data corresponding to their numeric values,
stored in the formulae. The DF command may be used to reset
these cells to numeric types if desired. Conversion errors
are ignored. Input and output are disabled on completion of
the command.
CMPFRM V1:V2[,V3:V4]
Compares two formulas. It returns, in the % accumulator,
the index of the formula in cell V2 in the formula in cell
V1. Lengths used are those of both formulas UNLESS the V3
and V4 cell arguments are seen. In that case the value of
V3 will be used as the length of the formula for V1 and the
value of V4 will be used as the length of cell V2. If ei-
ther value in V3 or V4 is outside the range 1 to 109 both
values in V3 and V4 will be ignored. Also on output the W
accumulator will be set to -1. if V1 is lexically earlier
than V2, 0. if they are lexically equal, and +1. if V1 is
lexically later than V2.
LENFRM V1:V2
returns the length of the formula for cell V1 in the % ac-
cumulator and in cell V2 IF CELL V2 IS VALID. Otherwise the
cell specified in V2 is ignored, though it must be present
in the command or function.
TRMFRM V1:V2,V3,V4
Reads the formula in V1 and uses V3 and V4 as start and end
byte numbers within it. It returns to V2 the formula that
is between the start and end bytes, trimming the V1 formula
into V2 by chopping out the undesired parts. The find sub-
string function CMPFRM can be used to find delimiter bytes
if absolute columnar formatting is not desired.
Associated DBxxxxxx and FILxxxxxx commands both exist and have
the same syntax.
AnalytiCalc Logical Names
AnalytiCalc/Amiga has a symbol table and allows you to define
symbolic names of up to 16 characters length, containing letters or
numbers, and use them inside equations.
To define a symbolic name, use the command
TE {SYMBOLICNAME=Vn
where Vn is a cell name (like A5, R17, AB122, or the like), and "SYM-
BOLICNAME" is the name you wish to define. The name is now asso-
ciated with the CONTENTS OF the cell named (as Vn). When you use the
construct {SYMBOLICNAME in an equation, the contents of the cell as-
sociated with that name replace the name prior to evaluation. Any
contents may be used, though the total resulting string must not grow
to over 109 characters. Recursive substitutions are permitted to a
depth of 20, so name definitions may use other name definitions.
To remove a name definition, use the command
TE {SYMBOLICNAME=0
Appendix D
AnalytiCalc Function Summary
The available multiple argument functions are:
SUM[variables] Sum of all arguments
MAX[variables] Max of arguments
MIN[variables] Min of arguments
AVG[variables] Average of arguments
AVE[variables] Average of arguments excluding zero args
STD[variables] Standard deviation squared
AND[variables] Boolean AND of all variables in list
IOR[variables] Boolean inclusive OR of variables
NOT[variable] Boolean complement of variable
XOR[v1,v2] Boolean exclusive OR of v1,v2
EQV[V1,V2] Boolean "equivalence" of V1,V2
(complement of exclusive OR, true if
bits have the SAME value)
CNT[variables] Number of nonzero variables in list
MOD[V1,V2] Returns V1 modulo V2 (i.e., remainder
of V1/V2 division.)
SGN[v1] Returns 1.0 times sign of V1
LKP[var,variables] Lookup variable in "variables" range
greater or equal to var, return its
index (starting with 0) into variables
range.
LKN[var,variables] Lookup variable in "variables" range
less than or equal to var, return its
index (starting with 0) into variables
range.
LKE[var,variables] Lookup variable in "variables" range
strictly equal to var, return its index
(starting with 0) into range. Note all
LKP, LKN, LKE return the last variable
index if no satisfactory value found.
NPV[disc,vars] Net Present Value of vars (equal time
interval numbers), at discount rate
disc where disc is a fraction
(e.g., .12 for 12%)
IRR[PV,FV,returns] Internal Rate of Return. Will compute
internal rate of return on up to 20
periods, returning rate per period.
The returns are expected to be at
equal time intervals. PV and FV are
initial and final values of investment
and the result is computed via Newton
approximation.
PMT[princ,inter,nper] Payment (mortgage payment per period)
function. Will compute payment per period
for principal amount "princ" with interest
per period as "inter" and number of periods
as "nper". All arguments must be cells.
The formula is the standard ordinary annuity
formula. Interest rate must be a fraction so
that 14% would be 0.14, for example.
PVL[payment,inter,nper] Present Value formula. Computes present
value of an annuity given "payment", the payment
per period, interest rate per period (as a
fraction, so 12% is 0.12) in "inter", and
number of periods as "nper". All arguments
must be in cells.
RND[DUM] Generates a random number between 0. and
1.0. An argument is needed but it is
NOT touched by this function.
.INDEX Random numbers
.Index RND function
IF [V1.rel.V2] statement | else-statement
Compares two variables and executes either "statement" (if the
relation is true) or "else-statement" (if the relation is
false).
Valid relations (in the place of the .rel. above) are:
.EQ. Equal
.NE. Not Equal
.GT. Greater than (V1 greater than V2)
.LT. Less than (V1 less than V2)
.GE. Greater than or Equal to (V1 >= V2)
.LE. Less than or Equal to (V1 =< V2)
The following special constructs in a formula act as functions:
_@V1,V2 Means get the values stored in V1 and V2 and use
them as column and row locations pointing at some cell
in the sheet. Replace the construct with the name of
that cell.
_#V1 Means take the real number in cell V1 and unpack it as
if it had been a packed value from a formula with 8
characters packed; then convert it back into ASCII and
place in the formula in place of this construct. This
construct is intended to be used with the *U STRVL
function to allow retrieval and edit of formulas. The
*U XQTCM function permits use of the EDit command
within a cell for string manipulation.
The following "equation commands" also act as functions with the
effects described:
*@filename Where filename is the name of a file of CALC com-
mands. CALC reads the file and executes the commands.
*ASCII Declares a list of variables to be of type ASCII.
*C COMMENT line.
*N NOVIEW.
*V VIEW. Controls printing options in K mode
*R READ. Allows a single line to be read from the terminal.
*REAL declares specified variables to be REAL*8.
*DECIMAL Declares specified variables to be REAL*8.
*S STOP. Same as *E. Goes back to spreadsheet.
*E EXIT. Gets out of K mode, back to spreadsheet mode.
*Z ZERO. Zeroes all accumulators.
*G *G V1,V2 (where V1 and V2 are cell or accumulator names)
will evaluate V1 and V2 as the column and row numbers,
on the physical sheet, of the desired cell. The ad-
dressed cell's value is retrieved and used as the
resulting number.
*W Takes the value at the current cell and writes it out to
the formula as a numeric (floating) value. The *WF
command stores the cell similarly, but uses the format
of the current cell instead of the D32.25 format used
for *W.
*P The *P command resets the current cell coordinate from
within a cell (until the next cell is evaluated only).
It has several forms:
*P - By itself, *P causes Calc to prompt for the new phy-
sical column and row number.
*P V1 - This moves the current location to the named cell
where V1 is the cell name (e.g. A5, H2)
*P@ V1,V2 - This uses V1 and V2 (cell names) as column
and row numbers and changes the current physical cell
position to that defined by the contents of cells V1
and V2. This gives complete addressing of the sheet
from within any cell.
*F *F Label - If the value in % is positive and nonzero this
command rewinds the input file for the AnalytiCalc @
command and seeks a line beginning with the characters
*CLabel (where "label" is what you put after the *F
command).
*J *J Label - This command behaves as the *F command but
operates on the file used by the Calc *@ command rather
than the AnalytiCalc one.
*QF
*QW The *QF (Float) or *QW (write) commands are used to
examine sequential files created outside AnalytiCalc
and return values or formulas. Their syntax is
*QF filename ?key1? ?key2? <lm>
or *QW filename ?key1? ?key2? <lm>
where ?key2? is optional
l and m are delimiter characters for start and end of
the parts of the selected records to extract (defaults
to first part of the record) filename is just the file
specifier in the host OS. The *QF command gets a part
of a record containing the keys specified and turns it
into a number ("floats" it). The *QW command Writes
that part of the record to a formula. The special
characters in the <lm> part of the command are
delimiters of the area to be picked out. Variant forms
allow such choosing to be by column number instead of
key character if needed.
*U YRMOD VY,VM,VD
returns the Julian date (in %) computed from the Year
(in VY), the month (in VM) and the day (in VD), where
VY, VM, and VD are sheet cells. These may be the
result of date arithmetic.
*U JDATE Var
assumes the formula in cell Var (any spreadsheet cell
name) contains a date string in the format YY/MM/DD.
It reads this formula and converts the date to a Julian
date, returning it in the % accumulator.
*U JTOCH Jul,Var
assumes that variable Jul (any spreadsheet cell) con-
tains a Julian date and changes it into an ASCII string
in the cell whose name is in the Var position here.
*U DATE VY,VM,VD,Var
uses VY, VM, and VD as year, month and day, and com-
putes a Julian date from them. It then composes an
ASCII string of form YY/MM/DD for that date and stores
in the formula for Var.
*U WKDYS D1,D2
computes the number of workdays between Julian dates D1
and D2 just as taking the difference of two Julian
dates gives differences between calendar dates in days.
*U WKDIN D1,N1
returns a Julian date that is N1 work days after the
date in D1.
*U IDATE()
returns the current date as a Julian day.
*U MTXEQ(AA:AA,XX:XX,BB:BB)
solves equation AX=B where A, X, and B are matrices,
and where the notation AA:AA means two cells at the
upper left and lower right edges of matrix A (e.g.
B2:C3 for the 2 X 2 matrix so defined), and the XX:XX
and BB:BB notation means the same for the X and B ma-
trices.
*U MOVEV mtxa,mtxb
moves values from mtxa to mtxb (useful prior to calling
MTXEQ).
*U MDET mtx
This function computes and returns the determinant of
matrix mtx.
*U MPROD A,B,C
This function will multiply matrix A by matrix B giving
matrix C, provided that their dimensions are compati-
ble.
*U MADDV A,B,C
This function adds matrix A to matrix B and stores in
matrix C. All matrices must have the same dimensions.
*U MSUBV A,B,C
This function subtracts matrix B from matrix A leaving
the result in matrix C.
*U MMPYT A,B,C
This function multiplies matrix A-transpose by matrix B
and stores the result in matrix C; dimensions must be
compatible.
*U MMPYC A,B,K
This function multiplies every element of matrix A by
constant K.
*U VARY X,A,W,I,P;Q;R;S;T;U;V;W
(Equation Solving by Iterative Search)
This function allows AnalytiCalc to automatically
search for solutions to equations over up to 8 dimen-
sions. The operation is that the accumulators named in
the fields shown as P;Q;R;S;T;U;V;W (one to 8 may be
specified, only one is required) are varied by a frac-
tion W about their initial values (later scaled down by
the gradient of the change in X) to attempt to get ac-
cumulator or cell X to equal accumulator or cell A.
This is done for I iterations, where I is another ac-
cumulator.
*U XQTCM command will execute the command (terminated by the
end-of-line), with any command except X or K permitted,
from inside a cell. This allows command files driven
from cells to control moving data, etc.
*U STRVL V1,start;len
will return a value that is made from up to 8
characters in the FORMULA of cell V1 (where V1 is any
cell name), starting at character "start" and for "len"
characters.
*U HERE
will return the current location on the matrix and the
current maximum row and column used. T,U get col, row.
W,Y get max col, row used.
*U FFTFW and *U FFTRV perform Fast Fourier Transforms in the forward
and reverse (inverse) directions on the given range of
data.
*U LINEF Vy:Vy,Vx:Vx (with the Vx range optional) fits a line to the
input range. Eqn: y=Ux+T. % gets err, W gets cor.
coef.
*XV filename V1
*XF filename V1 The *X class commands are for sheet linkages.
*XF loads a Formula from another saved spreadsheet,
while *XV loads a Value.
The following *U DBxxxxxx functions also exist as commands of
form FILxxxxxx with the same results.
*U DBOPINS range filename Open input sequential on filename for
cells in range When the input file is open and any
operation causes a read of the cell, the FORMULA will
be taken from the file and used. If the file is opened
with the OPINU option (for Update), then when the FOR-
MULA of the cell is written, it will also write to the
file. The OPINU option applies only to random access
files. Initially both input and output reads are dis-
abled (ENAINP and ENAOUT enable them). When a sequen-
tial file (or device such as a mailbox, pipe, or
communications line) is used for input, it is advanta-
geous to read data into a range once, then disable
input/output again, to allow it to be handled between
these commands. The EDTINP and FMTOUT commands are
designed to do this to make it easier to use
AnalytiCalc for a filter between sequential files.
*U DBOPINR range filename Open input random on filename for cells in
range
*U DBOPINU range filename Open range for update on filename for read
and write as random access. skip 1
*U DBCLSINP Close input
lexically later than V2.
*U DBLENFRM V1:V2 returns the length of the formula for cell V1 in
the % accumulator and in cell V2 IF CELL V2 IS VALID.
Otherwise the cell specified in V2 is ignored, though
it must be present in the command or function.
*U DBTRMFRM V1:V2,V3,V4 Reads the formula in V1 and uses V3 and V4
as start and end byte numbers within it. It returns to
V2 the formula that is between the start and end bytes,
trimming the V1 formula into V2 by chopping out the un-
desired parts. The find substring function CMPFRM can
be used to find delimiter bytes if absolute columnar
formatting is not desired. As in all these functions,
CMPFRM and LENFRM have the forms
*U WKDYS V1,V2
takes Julian dates in variables V1 and V2 and computes the number of
workdays between the two, not counting the initial date if it is a
workday (to be similar to differences between Julian dates).
*U WKDIN V1,V2
takes a Julian date in V1 and a number of days in V2 and returns the
Julian date that is V2 workdays after the date in V1. It is thus a
sort of inverse for the *U WKDYS function. The resulting date is
guaranteed to be in the Monday to Friday range. A workday is Monday
to Friday. The functions know nothing of holidays.
In V18-08A, AnalytiCalc can compute line fits and Fast Fourier
transforms on data.
*U LINEF Y1:Y2,X1:X2
computes a line whose equation is Y=mX+B, where m is returned in the
U accumulator and B is returned in the T accumulator. The % accumu-
lator returns the fitting error in Y. The line is fit over the range
Y1:Y2 in Y, with the X coordinates optional and if they are present,
they must be in the cells in the X1:X2 range given. If the X range
is omitted, 1. to the max. number of points will be used.
*U FFTFW V1:V2
computes the forward (t to freq) Fourier transform of the range and
*U FFTRV V1:V2
computes the reverse (freq. to t) transform. The range must be a
power of two long (if less, the largest power of 2 available is used
and extra points are ignored). Data is assumed to be the real coef-
ficients in the first half and the imaginary ones in the second half.
FFT data is returned in this layout also. Thus, the real data (which
is frequently the part of interest) is returned first. The reverse
FFT of the forward FFT returns the original data. The FFT is of in-
terest for finding the frequency distribution of partially sinusoidal
distributions.